package nina.yiyou.performance.s20confirm.input


import static java.util.stream.Collectors.toMap

class EmployeeServingFilterer {

  EmployeeServingFilterer(Map basicMap, Map attendMap) {
    _basicMap = basicMap
    _attendMap = attendMap
  }

  Map<String, Map> filter() {
    return _basicMap.entrySet().stream()
        .filter { _attendMap.containsKey(it.key) }
        .collect(toMap({ Map.Entry e -> e.key }, { Map.Entry e -> e.value }))
  }

  private final Map<String, Map> _basicMap

  private final Map<String, Map> _attendMap
}
